#ifndef FORM_H
#define FORM_H

#include <QWidget>
#include <QSerialPort>
#include <QLabel>
#include <QPoint>
#include <QMouseEvent>

namespace Ui {
class Form;
}

class Form : public QWidget
{
    Q_OBJECT

public:
    explicit Form(QWidget *parent = nullptr);
    ~Form();

    void insertPixmap( QLabel *label, const QString addr);
    void LampControl(QString data, QString data1, QString data2, QLabel *label);
    void airConditioningControl(QString data, QString data1, QString data2, QLabel *label);
    void TelevisionControl(QString data, QString data1, QString data2, QLabel *label);
    void mouseMoveEvent(QMouseEvent *e);//鼠标移动
    void mousePressEvent(QMouseEvent *e);//鼠标按下移动
    void CurtainControl(QString data, QString data1, QString data2, QLabel *label);
public slots:
    void slotReadData();
private slots:
    void on_toolButton_clicked();

    void on_toolButton_2_clicked();

    void on_toolButton_3_clicked();

private:
    Ui::Form *ui;
    QSerialPort * serialPort;
    QPoint p;
};

#endif // FORM_H
